<%inherit file="/base.html"/>
<%def name="title()">Health Check</%def>
<%def name="content()">
% for group in groups:
	<h2>${group.name} <a href="/health/${group.id}/check_group">Check All</a></h2>
	<table class="data">
	<thead>
		<tr>
			<th>서버</th>
			%for check in group.senario_set.filter(enabled=True):
				<th colspan="3">${check.title}</th>
			%endfor
		</tr>		
	</thead>
	<tbody>
	%for server in group.server_set.all():
		<tr>
			<td>${server.address}</td>
			%for check in group.senario_set.filter(enabled=True):
				<td class="status"><a class="${check.latest_log(server).status}" href="/health/${check.id}_${server.id}">${check.latest_log(server).status}</a></td>
				<td>${check.latest_log(server).created_at}</td>
				<td><a href="/health/${check.id}_${server.id}/check_one">Check</a></td>
				
			%endfor
		</tr>
	%endfor
	</tbody>
	</table>
%endfor
</%def>
